package com.framework.Module.flow.flowelement;

import com.framework.Table.Table;
import com.framerock.db.DBConn;
import com.framerock.baselib.Rock;

public class Tableflowelement extends  Table{


    protected void initTable() {
        this.tablename   = "flowelement";
        this.tablenamesm = "模块字段";

        this.flowsetMap  = Rock.getMap(new String[]{
                "type", "系统",
                "sort", "902",
                "isxt", "1",
                "sortdir", "sort"
        });

        this.addfields("modeid", "int(11)", "0", "对应模块", new String[]{
                "isbt","1",
                "islb","0",
                "attr","readonly"
        });
        this.addfields("name", "varchar(100)", "", "名称", new String[]{
                "isbt","1",
                "isss","1",
        });
        this.addfields("fields", "varchar(50)", "", "对应字段@fieldsdata@录入项时不存在会自动创建", new String[]{
                "isbt","1",
                "isss","1",
                "attr","onlyen noint",
                "fieldstype","selectdatafalse"
        });
        this.addfields("fieldstype", "varchar(50)", "", "字段类型@fieldstype,value", new String[]{
                "isbt","1",
                "fieldstype","rockcombo"
        });
        this.addfields("dev", "varchar(100)", "", "默认值", new String[]{
                "islb","0"
        });
        this.addfields("data", "varchar(500)", "", "数据源", new String[]{
                "islb","0",
                "fieldstype","textarea"
        });
        this.addfields("dbtype", "varchar(50)", "", "表字段类型@@创建数据库表字段用", new String[]{
                "islb","0"
        });
        this.addfields("lens", "int(11)", "0", "长度", new String[]{"islb","0"});
        this.addfields("attr", "varchar(500)", "", "字段属性", new String[]{"islb","0"});
        this.addfields("ftype", "varchar(100)", "", "字段分组", new String[]{"iseditlx","1"});
        this.addfields("islu", "tinyint(1)", "1", "录入项@@开启在录入页显示", new String[]{"iseditlx","1"});
        this.addfields("isbt", "tinyint(1)", "0", "必填项@@必须填写", new String[]{"iseditlx","1"});
        this.addfields("iszs", "tinyint(1)", "1", "可展示@@详情页展示", new String[]{"iseditlx","1"});
        this.addfields("isss", "tinyint(1)", "0", "可搜索@@列表页可搜索筛选", new String[]{"iseditlx","1"});
        this.addfields("islb", "tinyint(1)", "1", "列表列@@列表页里显示", new String[]{"iseditlx","1"});
        this.addfields("isonly", "tinyint(1)", "0", "唯一值@@不能重复录入", new String[]{"islb","0"});
        this.addfields("isdr", "tinyint(1)", "0", "可导入@@开启可导入", new String[]{"islb","0"});
        this.addfields("ispx", "tinyint(1)", "0", "可排序@@列表页里可排序", new String[]{"iseditlx","1"});
        this.addfields("sort", "int(11)", "0", "排序号", new String[]{"ispx","1","iseditlx","2"});

        this.addfields("isalign", "tinyint(1)", "0", "列对齐@0|居中,1|居左,2|居右", new String[]{"islb","0"});
        this.addfields("iseditlx", "tinyint(1)", "0", "列编辑@0|不开启,1|任何人,2|仅管理员,3|仅超级管理员", new String[]{"islb","0"});
        this.addfields("placeholder", "varchar(100)", "", "提示内容", new String[]{"islb","0"});
        this.addfields("gongshi", "varchar(500)", "", "公式@@仅再录入页使用", new String[]{
                "islb","0",
                "fieldstype","textarea"
        });
        this.addfields("zdsm", "varchar(500)", "", "字段说明@@显示在字段下面的说明", new String[]{
                "islb","0",
                "fieldstype","textarea"
        });

        this.addfields("modeid", "KEY", "`modeid`", "模块ID索引");
        this.addfields("modeidfields", "UNIQUE KEY", "`modeid`,`fields`", "唯一的索引");
    }
}
